import request from '/@/utils/request';

/**
 * OIDC 令牌管理 API
 */

// 获取令牌列表
export function getTokenList(params: any) {
  return request({
    url: '/oidc/admin/tokens',
    method: 'get',
    params,
  });
}

// 撤销令牌
export function revokeToken(tokenId: string,tokenType: string) {
  return request({
    url: `/oidc/admin/token/revoke`,
    method: 'post',
    params: {
      id:tokenId,
      tokenType:tokenType,
    },
  });
}

// 批量撤销令牌
export function batchRevokeTokens(data: any) {
  return request({
    url: '/oidc/admin/tokens/batch-revoke',
    method: 'post',
    data,
  });
}